home *** CD-ROM | disk | FTP | other *** search
- WADGC - a simple PWAD graphics compiler (pre-release version, July 27, 1994)
-
- The program takes a text input file, and creates a PWAD file for Doom
- version 1.1, 1.2 or 1.5 with any or all of the following entries:
-
- Sprites (curently between S_START and S_END entries as required for Doom 1.2)
-
- Floor and ceiling textures (between F_START and F_END entries)
-
- Wall patches, PNAMES, TEXTURE1 & TEXTURE2 entries
-
- Note that TEXTURE1/2 and PNAME resources can only fully replace those
- already in the IWAD. Therefore, the original resource data are kept
- and any new patch names and textures appended to them. Since the original
- data is copyrighted, you'll have to extract it from your DOOM.WAD for
- yourself. Use the supplied utility WADEXT, or DEU or any other suitable
- WAD editor, and extract the entries PNAMES, TEXTURE1 and TEXTURE2 as raw
- data into files named "pnames.raw", "texture1.raw" and "texture2.raw",
- respectively, and you're ready to go.
-
- As of Doom version 1.2, sprites can only be replaced on a wholesale basis.
- Every sprite for every object must be explicitly present between
- S_START...S_END entries in your PWAD. This will change in version 1.5.
-
- Floor textures can NOT be included in PWAD files. You need to build a
- new IWAD file to change these freely, and if you do, a few names must
- still be present for Doom to run, since they are used for a few other
- purposes, too. Refer to the Unofficial Doom specs for details. See also
- the utility NEWFLATS in the vicinity of this document.
-
- The input file is a plain ASCII text file. The spelling is crucial,
- and everything is case-sensitive. Extra blank lines, spaces and tabs are
- allowed anywhere, though, to increase the readability. Comments are
- allowed and should be preceded with a hash (#). Comments can be placed
- on a line of their own or after a command on the same line. Everything
- from the # to the next end of line is considered a comment and ignored.
-
- Input PPM files must be in raw format (P6), not text format (P3). The
- image is color quantized to the Doom palette when it is read in. If you
- want to be certain about the results, use only the Doom colors when you
- create the image in the first place. My quantization is a raw extensive
- search for a best fit on a pixel by pixel basis, which is quite crude and
- very slow. If only the Doom palette colors are used, images will be read
- in about 30 times faster.
-
- Existing textures may be replaced, and new ones added. Changing existing
- textures is needed to change the frame animated walls. All replacement
- textures must be listed before any new textures, and they must be in the
- same order as in the original IWAD file. This is similar to the utility
- NEWFLATS. It is a limitation, but not a severe one. What it restricts you
- from doing is changing the number of animation frames for animated walls.
-
-
- The input text file format should be as follows.
-
- The sprites section:
- --------------------
- S_START
- <spritename> <ppmfilename> @ <x_origin y_origin> W <width> H <height> X <x_insertion> Y <y_insertion>
- ...
- S_END
-
- x_origin and y_origin define the upper left corner for the sprite image
- within the ppm image. Having several sprites in one input image gives
- you a better overview when editing them.
-
-
- The wall patches section:
- -------------------------
- P_START
- <patchname> <filename> @ <xorigin yorigin> W <width> H <height>
- ...
- P_END
-
- Apart from the lack of an insertion point, this is exactly the same
- format as the sprites section. The insertion point for wall patches
- is always at the middle of the bottom row of pixels.
- The P_START/P_END markers are actually not written to the WAD file.
- If they were, all the original wall patches would become inaccessible.
- New wall patches are just placed on the top level in the WAD directory.
- Therefore, make sure they do not have the same name as any of the
- existing entries: wall patches, sprites or non-graphic resources.
- (Unless you want to replace an existing wall patch, in which case you
- should of course specify the same name as the existing one.)
-
-
- The textures section:
- ---------------------
- TEXTURE1_START
- <texturename> <width> <height> <numpatches>
- <patchname> <xoffset> <yoffset>
- <patchname> <xoffset> <yoffset>
- ...
- <texturename> <numpatches>
- <patchname> <xoffset> <yoffset>
- ...
- TEXTURE1_END
- TEXTURE2_START
- (exactly like TEXTURE1 above)
- TEXTURE2_END
-
- Note that patches are referred to by name. All the names used must
- be present either in the original PNAMES entry or in the P_START..P_END
- section.
-
- The floor/ceiling section:
- --------------------------
- F_START
- F1_START
- <texturename> <filename> @ <xorigin yorigin>
- F1_END
- F2_START
- <texturename> <filename> @ <xorigin yorigin>
- F2_END
- F_END
-
- Apart from the absence of a size specification, this is
- the same format as the wall patch section. The width and
- height of these textures are always 64.
- Either F1_START..F1_END or F2_START..F2_END may be omitted.
-
- Note that having floor/ceiling entries in a PWAD file gives an
- error if you try to run Doom with it using the -file option.
- For information on how to make your own flats, see the file
- NEWFLATS.README.
-
- Any of the sections S_START...S_END, P_START...P_END,
- TEXTURE1_START...TEXTURE1_END, TEXTURE2_START...TEXTURE2_END or
- F_START...F_END may be omitted. The presence of the section
- P_START...P_END automatically generates a PNAMES entry. The
- presence of any of the sections TEXTUREn_START...TEXTUREn_END
- yields a corresponding TEXTUREn entry.
-
-
- Example input file:
- -------------------
- # A very simple example input file for WADGC
- S_START # Some dummy sprites
- TESTSPR1 test.ppm @ 0 0 W 8 H 8 X 4 Y 8 # The first test sprite
- TESTSPR2 test.ppm @ 8 0 W 8 H 8 X 4 Y 8 # A second test sprite
- S_END
-
- P_START # A few new wall patches
- TESTPTC1 test.ppm @ 0 8 W 8 H 8
- TESTPTC2 test.ppm @ 8 8 W 8 H 8
- P_END
-
- TEXTURE1_START # One replacement texture for AASTINKY and one all new
- AASTINKY 8 16 2
- TESTPTC1 0 0
- TESTPTC2 0 8
- TESTWALL 16 16 4
- TESTPTC1 0 0
- TESTPTC2 0 8
- TESTPTC1 8 0
- TESTPTC2 8 8
- TEXTURE1_END
-
- F_START # Floor tiles are actually not allowed in PWADS
- F1_START
- TESTFLR1 test.ppm @ 0 0
- F1_END
- F_END
-